-- GENERATED SPELL FOR [Razorfen Dustweaver] --


function spell0_4522(pUnit, Event) --@Enveloping Winds,n/a--
pUnit:FullCastSpellOnTarget(6728,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_4522', 12000, 1)
end

function spell1_4522(pUnit, Event) --@Summon Wind Howler,Self--
pUnit:FullCastSpellOnTarget(8271,pUnit)
pUnit:RegisterEvent('Sorts_4522', 591, 1)
end

function Sorts_4522(pUnit, Event)
local choix_sorts_4522 = math.random(0, 1)
if choix_sorts_4522 == 0 then
pUnit:RegisterEvent('spell0_4522', 1, 1)
end
if choix_sorts_4522 == 1 then
pUnit:RegisterEvent('spell1_4522', 1, 1)
end
end

function mob4522_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_4522', math.random(1500, 3000), 1)
end

function mob4522_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob4522_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob4522_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(4522, 1, 'mob4522_Action')
RegisterUnitEvent(4522, 2, 'mob4522_Leave')
RegisterUnitEvent(4522, 3, 'mob4522_Kill')
RegisterUnitEvent(4522, 4, 'mob4522_Die')
